package com.lanou.renrenxin.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.lanou.renrenxin.R;
import com.lanou.renrenxin.activity.ShoppingActivity;

/**
 * Created by zy on 16/3/1.
 */
public class PersonalFragment extends Fragment implements View.OnClickListener {
    private LinearLayout ll_shopping,ll_saoYiSao;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_personal,container,false);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        ll_shopping = (LinearLayout) getView().findViewById(R.id.ll_shopping);
//        ll_saoYiSao = (LinearLayout) getView().findViewById(R.id.ll_saoYiSao);
        ll_shopping.setOnClickListener(this);
//        ll_saoYiSao.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.ll_shopping:
                Intent intent = new Intent(this.getActivity(), ShoppingActivity.class);
                startActivity(intent);
                break;
            case R.id.ll_saoYiSao:
//                Intent intent1 = new Intent(this.getActivity(), CaptureActivity.class);
//                startActivity(intent1);
                break;
        }
    }
}
